package com.hxd.otc.module.fiat_deal.bean;

import com.hxd.otc.R;

import java.io.Serializable;

/**
 * Created by lzy on 2018/9/17 0017.
 * description ${选择法币Bean}
 */
public class SelectFiatBean implements Serializable {
    private String fiat;

    public SelectFiatBean(String fiat) {
        this.fiat = fiat;
    }

    public String getFiat() {
        return fiat;
    }

    public void setFiat(String fiat) {
        this.fiat = fiat;
    }

    public int getIcon() {
        switch (fiat) {
            case "USD":
                return R.mipmap.icon_fiat_usd;
            case "EUR":
                return R.mipmap.icon_fiat_eur;
            case "HKD":
                return R.mipmap.icon_fiat_hkd;
            case "TWD":
                return R.mipmap.icon_fiat_twd;
            case "CNY":
            default:
                return R.mipmap.icon_fiat_cny;
        }
    }

    @Override
    public String toString() {
        return "SelectFiatBean{" +
                "fiat='" + fiat + '\'' +
                '}';
    }
}
